Key
The key element defines a keyboard shortcut. Event handlers can be used to respond when the appropriate keys are pressed.
Attributes:
Attributes inherited from XUL Element
Set to true if the key, if fired should cancel the event chain.
The character that is must be pressed. This should be set to a displayable character.
Set to true to disable the key. This is often used with a broadcaster to disable a menu command and key at the same time.
For keys that do not have displayable characters, such as the enter key or function keys, use this attribute, instead of charcode. Valid keys are listed here.
A list of modifier keys that should be pressed to invoke the keyboard shortcut. Multiple keys may be separated by spaces or commas. Keys will map to other keys on platforms that do not have them.
- shift: The Shift key.
- alt: The Alt key. On the Macintosh, this is the Option key.
- meta: The Meta key. On the Macintosh, this is the Command key.
- control: The Control key.
- accel: The key used for keyboard shortcuts on the user's platform. Usually, this would be the value you would use.